<?php
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return=array();
if($_RQ['op']=='main'){
	$return['pluginset']['merchfooternav']=$this->model('diy')->merchfooternav($_SESSION['merchid'],$return['pluginset']);
	$setting=plugin('jy_weishop')->plugin_setting('coupon');
	$status=intval($_RQ['status']);
	$page=intval($_RQ['page'])?:1;
	$return['params']=array('status'=>$status);
	$list=model('jy_weishop/coupon')->getmycoupon($status,'','',$page);
	$return['list']=$list;
	$return['setting']=$setting;
	$return['coupon_wait']=model('jy_weishop/task')->pop_coupon_wait();
	$return['coupon_wait']=$return['coupon_wait']?$return['coupon_wait'][0]:false;
	if(!$return['coupon_wait']){
		$return['coupon_hd']=model('jy_weishop/task')->pop_coupon_hd();
		if(!$return['coupon_hd']){
			$return['game_wait']=model('jy_weishop/task')->pop_game();
		}
	}
	set_html('title','我的优惠券');
	exi($return);
}
?>